package com.winspread.app.hitl.room

import androidx.room.*

/**
 *Author: Amin
 *Data: 2022/4/19 9:22
 *
 *Description:
 *
 */
@Entity(tableName = "book")
class Book(val name: String) {
    @PrimaryKey(autoGenerate = true)
    var id: Long = 0
}

@Dao
interface BookDao {
    @Insert
    suspend fun insertAll(vararg books: Book)

    @Query("SELECT COUNT(*) FROM book")
    suspend fun queryBookAll(): Int

}
